﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>
    <script>
        //01
       
        var quantity = 2;
        var price = 0.99;
        console.log(quantity * price);

        var price = "0.99";
        console.log(typeof price);
        

        //02 numeric calculation gived NaN, if variable is undefined, not throwing error
        /*
        var count;
        var price = 5.00;
        console.log(price / count);
        console.log(typeof NaN);
        */

        //03 function to check is NaN
        /*
        var n = NaN;
        if (isNaN(n))
            console.log('NaN!');
        */

        //04
        /*
        var total = 5.1 + 3.3
        console.log(total);
        */
    </script>
</body>
</html>